package com.byxm.wlgw.control;
/**
 * kimxc
 *商品大类别 列表 Action
 */
import java.util.List;
import com.byxm.wlgw.bean.JgqjBean;
import com.byxm.wlgw.bean.Splb_sBean;
import com.byxm.wlgw.bean.SpppBean;
import com.byxm.wlgw.bean.SpxhBean;
import com.byxm.wlgw.bean.SpxxBean;
import com.byxm.wlgw.common.Pages;
import com.byxm.wlgw.service.JgqjService;
import com.byxm.wlgw.service.Splb_sService;
import com.byxm.wlgw.service.SpppService;
import com.byxm.wlgw.service.SpxhService;
import com.byxm.wlgw.service.SpxxService;
public class ListAction extends BaseAction{
	
	private static final long serialVersionUID = 1L;
	
	/******************前台接受数据**********/
	//商品第一类别   男鞋女鞋类别
	private String splbfid=null;
	//商品第二类别  功能类别  板鞋篮球鞋
	private String splbsid=null;
	//商品品牌
	private String ppid=null;
	//价格区间ID
	private String jgqjid=null;
	//商品型号ID
	private String xhid=null;
	
	
	/******************************************/
	/**传回前台的数据*/
	//品牌信息LIST
	private List<SpppBean> lstSppp=null;
	//商品小类别LIST  功能   跑鞋  篮球鞋 板鞋
	private List<Splb_sBean> lstSplb_s=null;
	//价格区间
	private List<JgqjBean> lstJgqj=null;
	//商品型号   鞋子码字
	private List<SpxhBean> lstSpxh=null;
    //商品展示
	private List<SpxxBean> lstSpxx=null;
	//前台URL值
	private String urlstring="";
	//给前台的pages信息
	private Pages pages=null;
	//页数
	private String cpage=null;



	public String lblist(){
		SpppService spppService=new SpppService();
		Splb_sService splb_sService=new  Splb_sService();
		SpxhService spxhService=new SpxhService();
		JgqjService jgqjService=new JgqjService();
		SpxxService spxxService=new SpxxService();
		//用来传值的Bean
		SpxxBean spxxBean=this.getQtcs();//获取前台参数
		//获取分页信息
	    pages=this.getSpxxPages(spxxBean,12,cpage);
		try {
			//商品品牌LIST
			lstSppp=spppService.getSppp(Integer.parseInt(splbfid));
			//商品功能LIST
			lstSplb_s=splb_sService.getSplb_s(Integer.parseInt(splbfid));
			//商品价格区间LIST
			lstJgqj=jgqjService.getJgqj();
			//商品型号
			lstSpxh=spxhService.getSpxh(Integer.parseInt(splbfid));
			//商品展示List
			lstSpxx=spxxService.getSpxx(spxxBean,pages);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return SUCCESS;
	}


/**************私有方法区******************/

	/**
	 * 获取前台参数
	 */
	private SpxxBean getQtcs(){
		SpxxBean spxx=new SpxxBean();
		spxx.setKczt(1);
		if(splbfid!=null){
			spxx.setSplbfid(Integer.parseInt(splbfid));
		}
		if(splbsid!=null){
			spxx.setSplbsid(Integer.parseInt(splbsid));
		}
		if(ppid!=null){
			spxx.setPpid(Integer.parseInt(ppid));
		}
		if(jgqjid!=null){
			spxx.setJgqjid(Integer.parseInt(jgqjid));
		}
		if(xhid!=null){
			spxx.setXhid(Integer.parseInt(xhid));
		}
		return spxx;
	}
	
	
	
	/**
	 * 这个东西有致命BUG 暂时用着 以后修复
	 * 
	 */

	
/**************setter  geter*****************/

	public List<SpppBean> getLstSppp() {
		return lstSppp;
	}

	public void setLstSppp(List<SpppBean> lstSppp) {
		this.lstSppp = lstSppp;
	}
	public List<Splb_sBean> getLstSplb_s() {
		return lstSplb_s;
	}
	public void setLstSplb_s(List<Splb_sBean> lstSplb_s) {
		this.lstSplb_s = lstSplb_s;
	}
	public List<JgqjBean> getLstJgqj() {
		return lstJgqj;
	}
	public void setLstJgqj(List<JgqjBean> lstJgqj) {
		this.lstJgqj = lstJgqj;
	}
	public List<SpxhBean> getLstSpxh() {
		return lstSpxh;
	}
	public void setLstSpxh(List<SpxhBean> lstSpxh) {
		this.lstSpxh = lstSpxh;
	}
	public List<SpxxBean> getLstSpxx() {
		return lstSpxx;
	}
	public void setLstSpxx(List<SpxxBean> lstSpxx) {
		this.lstSpxx = lstSpxx;
	}
	public String getSplbfid() {
		return splbfid;
	}
	public void setSplbfid(String splbfid) {
		this.splbfid = splbfid;
	}
	public String getSplbsid() {
		return splbsid;
	}
	public void setSplbsid(String splbsid) {
		this.splbsid = splbsid;
	}
	public String getJgqjid() {
		return jgqjid;
	}
	public void setJgqjid(String jgqjid) {
		this.jgqjid = jgqjid;
	}
	public String getPpid() {
		return ppid;
	}
	public void setPpid(String ppid) {
		this.ppid = ppid;
	}
	public String getXhid() {
		return xhid;
	}
	public void setXhid(String xhid) {
		this.xhid = xhid;
	}
	public String getCpage() {
		return cpage;
	}
	public void setCpage(String cpage) {
		this.cpage = cpage;
	}
	public Pages getPages() {
		return pages;
	}
	public void setPages(Pages pages) {
		this.pages = pages;
	}
	public String getUrlstring() {
		return urlstring;
	}
	public void setUrlstring(String urlstring) {
		this.urlstring = urlstring;
	}
}
